package com.example.springboot.pojo;


import lombok.Data;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Entity
@Data
@Table(name = "users")
public class Users {
    @NotNull(message = "用户id不能为空")
    @Id
    private String user_id;

    @NotNull(message = "用户名不能为空")
    private String user_name;

    @NotNull(message = "密码不能为空")
    private String password;

    @NotNull(message = "用户权限不能为空")
    private int root;

    private String address;

    private String tel;

    @NotNull(message = "用户部门不能为空")
    private int role;

    @NotNull(message = "创建时间不能为空")
    private Date created_at;

    private Date updated_at;

    private Date deleted_at;
}
